Report post

What is HTML5 Local storage?

HTML5 local storage keeps the data in two JavaScript objects. Both of them are accessed in the same way and available globally: The JavaScript localStorage object stores data which doesn't expire. It will be available even if you end the session by closing your browser and stay till you delete it manually.

What is local storage?

localStorage is one of two mechanisms for the Web Storage API, the other being sessionStorage. The Web Storage API is a set of mechanisms that enable browsers to store key-value pairs. It is designed to be much more intuitive than using cookies.

What is localStorage read-only?

The localStorage read-only property of the window interface allows you to access a Storage object for the Document 's origin; the stored data is saved across browser sessions.

How to use local storage in JavaScript?

You can access it anywhere in your JavaScript code like this: With this reference you can start using the local storage to access and read data. To store data in the local storage, simply use the setItem () function on the Storage object and pass a key and value.

Related articles

The World's Leading Crypto Trading Platform

Get my welcome gifts